﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using model;
using Bll;

public partial class AppShow : System.Web.UI.Page
{
    EnterpriseBll ebll = new EnterpriseBll();
    ApplicationBll abll = new ApplicationBll();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] == null)
        {
            Response.Write("<script>alert('请先登录！');history.back();</script>");
        }else
        if (Session["usergroup"].ToString() == "enterprise")
        {
            Response.Write("<script>alert('您没有权限查看！');location.href='Applicationl.aspx';</script>");
        }
        if (!IsPostBack)
        {
            int ano = Convert.ToInt32(Request.Params["ano"]);
            model.Application app = abll.GetSingle(ano);
            Enterprise enter = ebll.GetSingle(app.Eno);
            lblename.Text = enter.Ename;
            lbleIntro.Text = enter.Eintro;
            lblPosition.Text = app.Position;
            lblPlace.Text = app.Place;
            lblNumber.Text = app.Number;
            lblSalary.Text = app.Salary;
            lblaIntro.Text = app.Aintro;
            lblConn.Text = app.Conn;
        }
    }
}